import { createRouter, createWebHistory } from 'vue-router'

const YolovDetect = () => import('@/views/YolovDetect')
const YolovTrain = () => import('@/views/YolovTrain')
const YolovView = () => import('@/views/YolovView')
const YolovLog = () => import('@/views/YolovLog')
const Dataset = () => import('@/views/Dataset')
const Annotate = () => import('@/views/Annotate')
const Weight = () => import('@/views/Weight')


const routes = [
  {
    path: '/',
    redirect: '/yolov_detect',
  },
  {
    path: '/yolov_detect',
    name: 'YolovDetect',
    component: YolovDetect
  },
  {
    path: '/yolov_train',
    name: 'YolovTrain',
    component: YolovTrain
  },
  {
    path: '/yolov_view',
    name: 'YolovView',
    component: YolovView
  },
  {
    path: '/yolov_log',
    name: 'YolovLog',
    component: YolovLog
  },
  {
    path: '/dataset', 
    component: Dataset
  },
  {
    path: '/annotate',
    component: Annotate, 
  }, 
  {
    path: '/weight',
    component: Weight, 
  }, 
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes, 
  linkActiveClass: 'active',
})

export default router